package com.whz.governance.redislimiter.filter;

import javax.servlet.http.HttpServletRequest;

/**
 * the rate limiter
 *
 * @author whz
 */
public interface RateLimitSupporter {

    /**
     * match url
     *
     * @param requestURI http request URI
     * @return TRUE IF MATCH PATH
     */
    boolean match(String requestURI);

    /**
     * limit http request
     *
     * @param request http request
     * @return true: allow access
     */
    boolean allowAccess(HttpServletRequest request);
}